<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <title>Dashboard</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="stylesheet" th:href="@{/css/bootstrap.css}" type="text/css">


    <!-- Custom styles for this template -->
    <link th:href="@{/css/board.css}" rel="stylesheet" type="text/css">
    <style>
        .bd-placeholder-img {
            font-size: 1.125rem;
            text-anchor: middle;
        }

        @media (min-width: 768px) {
            .bd-placeholder-img-lg {
                font-size: 3.5rem;
            }
        }
    </style>
</head>
<body>
    <div th:replace="TopNavBar :: topbar"></div>
    <div th:replace="LeftSideBar :: tealeftbar"></div>
    <div class="container-fluid">
        <div class="row">
            <main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-4"><br>
                <div th:replace="CardTemplates :: ShowAllQuestion"></div>
                <div th:replace="CardTemplates :: ShowMyQuestion"></div>
                <div th:replace="CardTemplates :: ShowMyAnswer"></div>
                <div th:replace="CardTemplates :: NeedAnswer"></div>
                <div class="table-responsive">
                    <h2><br>My lesson</h2>
                    <table class="table table-striped table-sm">
                        <thead>
                        <tr>
                            <th>#</th>
                            <th>LessonName</th>
                            <th>TeacherName</th>
                            <th>Department</th>
                            <th>Description</th>
                            <th>Credits</th>
                            <th>Action</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr th:each="myLesson:${myLessons}"><!-- 其中m是个临时变量，像for(User u : userList)那样中的u-->
                            <td th:text="${myLesson.lsnOrder}"/>
                            <td th:text="${myLesson.lsnName}"/>
                            <td th:text="${myLesson.teaName}"/>
                            <td th:text="${myLesson.dept}"/>
                            <td th:text="${myLesson.dscpt}"/>
                            <td th:text="${myLesson.credit}"/>
                            <td><button th:id="'more'+${myLesson.lsnOrder}" class="btn-primary" onclick=alert($(this).attr("id"));>More Info</button>&nbsp;
                        </tr>
                        </tbody>
                    </table>
                </div>
            </main>
        </div>
    </div>
</body>
<script type="text/javascript" th:src="@{/js/jquery-3.3.1.js}"></script>
<script type="text/javascript" th:src="@{/js/bootstrap.bundle.js}"></script>
<script type="text/javascript" th:src="@{/js/feather.min.js}"></script>

</html>